/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.corespring.restaurant.dao.hibernate;

import java.util.List;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;
import org.corespring.restaurant.dao.PerfilDao;
import org.corespring.restaurant.model.Perfil;
@Repository
public class PerfilDaoHibernate extends HibernateDaoSupport implements PerfilDao {

    @Autowired
    public PerfilDaoHibernate(SessionFactory sessionFactory) {
		setSessionFactory(sessionFactory);
    }

    @Override
    public List<Perfil> obtenerListaPerfiles() {
        List list = getHibernateTemplate().find(" from Perfil ");
        return list;
    }

}
